package org.restly;

import org.restly.servlet.RestlyHttpServletRequest;

/**
 * Nov 16, 2008, 10:01:53 PM
 *
 * @author <a href="mailto:erik.beeson@gmail.com">Erik Beeson</a>
 */
public enum ValidationType {
	GET, POST, PUT, DELETE;

	public boolean isType(RestlyHttpServletRequest request) {
		try {
			return this == valueOf(request.getMethod().toUpperCase());
		} catch(IllegalArgumentException e) {
			return false;
		}
	}
}
